Cause-lock sidebar isn't allowed to fully extend due to narrowing slot.
The shell that the lock is installed in is a HawkerBeechcraft part and unfortunately, its design is such that the slots on each side are not supported at one end allowing dirt, paint stripper or corrosion to press inward and compress the slots narrower. To repair, remove lock assembly from handle by removing the two screws on the side of the handle and remove the lock assembly from the handle. You can remove the lock assy even if the key is stuck in the lock.
Once the assembly is removed, you will see two slots, 180 degrees apart. In one slot you will see the lock side bar protruding slightly into the slot. If you can turn the lock in the shell and remove the key at both positions while holding the lock, then the lock is working fine. In this case, the lock stops working when you put the lock assembly in the handle because the corrosion or dirt is squeezing the lock shell causing the slots to close up not allowing the lock side bar to extend. Using a small brush, clean out the inside of the handle.
If when you turn the lock within the shell when holding it in your hand, and the key will not come out in both positions, then the slots may need to be opened up a bit, this can be done using a flat blade screw driver.
If this does not fix the problem, then you need to remove the lock core from the shell, this can be done by removing the larger woodruff key from the shell. It may be necessary to us a drimmel to grind the dings off the shell around the woodruff key. The dings are there to keep the woodruff key from falling out before you reinstall in the handle. So after you grind the dings off, pry the woodruff key out, then pull the lock core from the shell. Put the key in the lock core and see if the sidebar of the lock core will depress flush. If it does, the lock is fine, if it doesn’t, you need a new lock.