I had a similar situation, but in my case I needed to update only 2 rows ordered by a numerical identifier, so my query would be like this:
UPDATE myTable SET Column1='some data',Column2='some othe data' WHERE Column3='some criteria' LIMIT 1;
UPDATE myTable SET Column1='some data',Col2='some othe data' WHERE Column3='some criteria2' ORDER BY ID DESC LIMIT 1;
Note. The first query implicitly selects the first matching row in the table, and the second query selects the second matching row, obviously changing the order. He does not answer the question, but can help someone with a problem similar to mine.
source share