add lock to database items