UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VUNC/zTksYVJf+6e8TuuIhdgua+HoBQYK9um494vlbw='
WHERE
key_id = '5ab2826ef881eb7988f2867746721ab15cca6ae70389d770055df584e8982da7'
AND (
token = 'VUNC/zTksYVJf+6e8TuuIhdgua+HoBQYK9um494vlbw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)