Unexpected result from query based on old column value
I would try this one:

UPDATE 
    table t1 
SET
    upd = 1, 
    b1 = GREATEST(5, a1) 
WHERE
    b1 &lt;&gt; GREATEST(5, a1) ;


No need for "copying" the table or using the (not 100% sure) assumption that MySQL updates the columns in a specific order.

The answers in your link are about a much more difficult to do (in MySQL) operation, i.e. swapping the values of 2 columns. 



If you want to update multiple columns and set the upd=1 column if at least one of the other columns is updated, you can use a simple OR in the WHERE clause:

UPDATE 
    table t1 
SET
    upd = 1, 
    b1 = GREATEST(5, a1),
    b2 = GREATEST(7, a2),
    b3 = &lt;whatever&gt; 
    --- 
WHERE
   ( b1 &lt;&gt; GREATEST(5, a1)
  OR b2 &lt;&gt; GREATEST(7, a2)
  OR b3 &lt;&gt; &lt;whatever&gt; 
  ---
   ) ;