Bylo by to něco jako: delete t from loginsystem t where premium = '1 DAY' and created_at < now() - interval 1 day;