Update query reducer