select userID,randStr from sepet where durum = 0 AND tarih < '2018-07-22 00:04:25' group by randStr