UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0lXsKArB/D88WMtR9pilzW5ANJOiTxDITQv6xK56WiE='
WHERE
key_id = '033ea1e79dfa16b4bb452a2e684b244772c264e619bfa57192bf343c248872d0'
AND (
token = '0lXsKArB/D88WMtR9pilzW5ANJOiTxDITQv6xK56WiE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)