UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rx8Np7hSKeGOhVLxyearXE0TklR9zuesEm4JEdMvOGI='
WHERE
key_id = '0186d4a742b6ddf4b81b4dbff81c7063d94ca20119bb5eed362fb00ec8d62fb6'
AND (
token = 'rx8Np7hSKeGOhVLxyearXE0TklR9zuesEm4JEdMvOGI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)