Some of you might remember @Mikumo solmiki discard trick.
Well i also accidentally discarded my purine migantis sword not so long ago.
I had my sword locked, but was forced to unlock it to enhance it, when the discard menu suddenly popped up. Being excited for enhancing my gear i clicked on it in a rush and discarded it.
Losing my sword is a personal lesson, but the real problem here is that you have to unlock your equipment to enhance it. You would logically lock anything valuable that you dont want discard, and if you plan on enhancing it, it is most likely something of value.
So please let us enhance locked items, otherwise locking your items is kinda pointless.