On our database we too have to cope with very old and poorly coded programs developed by third parties. Before I was in charge the production database was going down in flames roughly once a week due to long running transactions causing the before image to blow the file system. Since we can't afford the investment to fix thousands of old programs we needed to develop a defense strategy.
That last line of defense on our databases is our database monitor which takes care, amongst others, of such long running transactions. It checks them every 30 seconds ( with 800 users bad things can happen quite fast ). Depending on the before image panic level it will even take extreme measures such as disconnecting client sessions ( be it batch processes or interactive users ) leaving long running transactions open. Again, If I were you, I would NOT care about the locks ( yes, they might be ugly ), instead I would care about long running transactions. For one, you can't just unlock a record but you can find which processes do have long running transactions uncommitted and you can kick this processes out of the database.
If your problem are share locks you could try to add the -NL parameter to the parameters to the client sessions. Per default the default lock is share-lock if not specified otherwise. This will alter the behavior to default to no-lock and might help long ways making your situation better. If that does not solve your problem then you are running out of options unless you can afford to fix the offending code.
If your problem is pessimistic locking then monitoring the transactions is the way to go. Any client that attempts to get an exclusive-lock on any record in the database can only do so within an active transaction. Therefore a transaction which you can monitor is automatically spawned when a record is locked exclusively.
You can't set an idle timeout for processes connecting to the database on the database level. Also, there is no such client setting available. Therefore, everybody has to roll his/her own. Whether this is a good or a bad thing is subject to debate. I tend to see it as a bad thing.
Heavy Regards, RealHeavyDude.