UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'DbT+orFu3FnLU2MGuFXk4fN2OTZHm1Q9wIAOlXJjy0U=' 
WHERE 
  key_id = '76c84c0b7d99a5a42f86dc0b3bdf122c1ca8e0f0c107519565cbeb05873fb8c9' 
  AND (
    token = 'DbT+orFu3FnLU2MGuFXk4fN2OTZHm1Q9wIAOlXJjy0U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041