update sql query with where condition