Table locks are only usefull if you can't use transactions.
Rule #1 in databases, never lock anything unles you have a valid reason for it. And you rarely do.
As for unfinished transactions; they don't exist with PHP. Every transaction is ended when the script ends. (rolled back by default ofcourse)
If you're still using mysql without InnoDB: start using InnoDB. If you're already using somehting better than mysql, use transactions.