In Oracle 11g you can add a wait clause to the lock table command in which you can specify how many seconds you want to wait to get the lock on the table.
SQL> lock table t in exclusive mode wait 10; lock table t in exclusive mode wait 10 *ERROR at line 1:ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired Elapsed: 00:00:09.95 SQL>