I found new solvation
I lock table,find last record,take its id in my block
Then table unlocks after commit

Am i correct?

p.s. is there unlock table statement in sql or
it unlocks automatically allways after commit or rollback?