delete record with lock example