update query with quantity