UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fnfsv4vSnG6MdSSNvHaJ1bnXUbMWMdMowzOG+n8Eytw='
WHERE
key_id = '7ae27dac9b949f447509a4d5ae291e6950265114a3f392271bc84f12c4e9eb33'
AND (
token = 'fnfsv4vSnG6MdSSNvHaJ1bnXUbMWMdMowzOG+n8Eytw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)