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