As discussed in you lambda example it is to late, to lock the Database call at the DAO level.
The requested operation might be outdated, because it was calculated from a TableModel, that reflects an old state of the library while the library is already updated in a new state. The way, handling the locking outside the DAOs like already done in the library scanners will be better. It has also the benefit for an unique interface, for all DB operations.