UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fxJouEtiM/+/Ze/+33VmlcapqUgAZ3rOuS1RvSYOk48='
WHERE
key_id = '62d1cb6bc290638c5dd221d3dcff2acff706ecfd068566ea5ea68c66b285474b'
AND (
token = 'fxJouEtiM/+/Ze/+33VmlcapqUgAZ3rOuS1RvSYOk48='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)