UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VoNN1K+CfnNiuxKK+mWBYyi0f42s2npwvI6YSMyiNyQ='
WHERE
key_id = 'a6fe76946ae0a7a06aa26b7072f3f4b2b5e6bf09935c334e51c4cd0d9bc17e44'
AND (
token = 'VoNN1K+CfnNiuxKK+mWBYyi0f42s2npwvI6YSMyiNyQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)