tdb2: check pid before unlock.