UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'dWYBKvOT/feyUo/kaiP/y8D27PhFjnBc/5lSCqRPy9c='
WHERE
key_id = '705dc85b3fff38cba7b4fabff63bbdc8ec15dfa3da1e7e18e0e4e2d8e2c9ab25'
AND (
token = 'dWYBKvOT/feyUo/kaiP/y8D27PhFjnBc/5lSCqRPy9c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)