Yes, you can change the lock timeout. The default is relatively low: 1 second (1000 ms).
In many cases the problem is that another connection has locked the table, and using multi-version concurrency also solves the problem (append ;MVCC=true
to the database URL).
EDIT: MVCC=true
param is no longer supported, because since h2 1.4.200 it’s always true for a MVStore engine, which is a default engine.