UPDATE `users` SET `logout_date`='2018-10-19 00:46:44' WHERE UNIX_TIMESTAMP(DATE_SUB('2018-10-19 00:46:44', 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