UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0oO90IpPNC6BLOQwzxlzZjUekheMxOZ9zVbJNgh2jYE='
WHERE
key_id = '726aad69d65213a68b5ce0c167ac0f41cb5172cc4e02f9692ef1e29137fb4e11'
AND (
token = '0oO90IpPNC6BLOQwzxlzZjUekheMxOZ9zVbJNgh2jYE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)