Update a query.