UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xFIBp1DgCl29eSlte0VW0fMGToo+pBlZsDofMrZI2zk='
WHERE
key_id = '9fa32c6c3b8f6e6b834c756ab739d1680865611705fcf2a3caa4a18a3bbd67af'
AND (
token = 'xFIBp1DgCl29eSlte0VW0fMGToo+pBlZsDofMrZI2zk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)