UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '89ZzRLec7CVOXexrkXrJF58fWNXi2IFXyHuQCWYurKU='
WHERE
key_id = 'cfc468ac4ffa7e0cde5c3ad92ebae4574d109bfaf4939c74b8e0628dbd7a16a6'
AND (
token = '89ZzRLec7CVOXexrkXrJF58fWNXi2IFXyHuQCWYurKU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)