UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Vn2ZYkh8U/MIrlN7WygSXYP2qhu6GXIWrD6fCi0K8vo='
WHERE
key_id = '2614cd79eb4dc4c1a22e4ffa48d807b0f6a86cf517cc2970ac2e8510ddc8358d'
AND (
token = 'Vn2ZYkh8U/MIrlN7WygSXYP2qhu6GXIWrD6fCi0K8vo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)