How to avoid row locks on both tables joined in an update?
You don't say what engine the tables are using (show create table $db.$table_name; ).

If you are using the MyISAM engine, you can manually lock the tables.  This isn't recommended for InnoDB tables because you will be over-riding the row level locking mechanism.

If you lock one table, you need to acquire a lock on all you use within the same lock command.  The command to lock both t1 and t2 for your purposes is...

lock table t1 write, t2 read;


After making your changes, you will want to immediately release the locks...

unlock tables;