How to lock the position of one of my bones?
Maybe you should explain more precisely what is your case. But for example, you could unparent your bone in Edit mode, then in Pose mode, give it a Child Of constraint (press the Set Inverse button to keep the bone at its original position). When you'll need the child bone to be unparented, you'll simply create 2 Influence value keyframes: at frame X-1 you'll keyframe an Influence of 1, and at frame X you'll keyframe an Influence of 0.