UPDATE `users` SET `logout_date`='2017-07-25 08:26:48' WHERE UNIX_TIMESTAMP(DATE_SUB('2017-07-25 08:26:48', INTERVAL 1440 SECOND)) > UNIX_TIMESTAMP(last_request_time) AND (`logout_date` ='0000-00-00 00:00:00')No database selected