UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fM/V2G1WTmmpTVW8C6F704kDEZjLiCy9Ud9CnG/NYKU='
WHERE
key_id = '27636908d62cb7d13a343b9813870e562a9062bd2f1cdd158ab09d160486ad1e'
AND (
token = 'fM/V2G1WTmmpTVW8C6F704kDEZjLiCy9Ud9CnG/NYKU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)