select userID,randStr from sepet where durum = 0 AND tarih < '2017-09-22 04:58:45' group by randStr