UPDATE * FROM  `data` set hata = 1 where user_id in(SELECT user_id FROM `users` where tarih < now()  )