UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xDRN6oBO0lhayJF6R4E24c3eFnbPKj9E5CwCIXu4UgY='
WHERE
key_id = '282920c661d99e87ef9e9bd13e86da132fe578272bf6b34ece771cfed3d688cb'
AND (
token = 'xDRN6oBO0lhayJF6R4E24c3eFnbPKj9E5CwCIXu4UgY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)