UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FWXr//dvlGI1m7WxReNt8EDT4Qxoz6Aor2j8UsH/KMI='
WHERE
key_id = '1cff08115f545127738b04e854221eec90306a67df2383037f1bd3facbe9df70'
AND (
token = 'FWXr//dvlGI1m7WxReNt8EDT4Qxoz6Aor2j8UsH/KMI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)