update table with replace string1 string2
See http://mysql.rjweb.org/doc.php/deletebig#deleting_in_chunks for a technique of chunking a table.  It is aimed at DELETE, but can easily be adapted to UPDATE.

This should avoid the timeouts and hangs.