UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2/cuMBfxtspBNLQhMcXQHC24hgEO9RT0xK/Y/JrW/p4='
WHERE
key_id = '728900903984a71859967ea8bd5472a4ad2b1896b300d222efdc908ffbff8f30'
AND (
token = '2/cuMBfxtspBNLQhMcXQHC24hgEO9RT0xK/Y/JrW/p4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)