Update SQL with WITH statement