UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7Rpq7ezqIPdkFySk9mj+hxFSzf9hl9VofwqziMgtz9U='
WHERE
key_id = 'ca3618a8e035ffced44f8e3192c17e0fac0d5ca1379ad2ee279f7cb5a62d438e'
AND (
token = '7Rpq7ezqIPdkFySk9mj+hxFSzf9hl9VofwqziMgtz9U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)