UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RdVCzi4lccxH5A0I7V//mmhS+jt0Q/XnclcFUx94LhU='
WHERE
key_id = '719bced0354b0def8e193aebef866cb5bb0376928fdcd11ce0025ba32b5bc6e9'
AND (
token = 'RdVCzi4lccxH5A0I7V//mmhS+jt0Q/XnclcFUx94LhU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)