This video demonstrates how user can update data of a particular table(t1), based on the join condition with other table(t2). So it would be a easy way to ditch the for-loop, and check for the condition every time. What was to be achieved from the for-loop can be achieved with a single simple update statement.
A simple trick to update data in table based on some conditional data in some another table, would help you to increase the performance of your code massively.
For ex :
UPDATE TABLE1 t1
SET COL1 = (SELECT COL FROM TABLE2 t2 where t1.col = t2.col);