Killing locked queries is not the first step in database tuning.
Queries locked for a long time usually depend on slow updates that lock
other updates or selects,
this happen on MyISAM (or table level locking engines).
If you are really sure you want and can without problems kill the queries
you can do a simple job to check and kill.
I would rather check why those queries are locked anyway.
2010/10/14 monloi perez <mlp_folder@stripped>
> Is there a mysql configuration to kill queries that have been locked for
> some time. If there's none what is an alternative approach to kill these
> queries and what is the root cause of it?