UPDATE `users` SET `logout_date`='2018-08-21 17:36:24' WHERE UNIX_TIMESTAMP(DATE_SUB('2018-08-21 17:36:24', INTERVAL SECOND)) > UNIX_TIMESTAMP(last_request_time) AND (`logout_date` ='0000-00-00 00:00:00')You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) > UNIX_TIMESTAMP(last_request_time) AND (`logout_date` ='0000-00-00 00:00:00'' at line 1