I concur with wondering why you need remove the gauge-glass fittings, but the circled “nuts” are not lock-nuts. Each is an outer bush, or adapator, screwed into a bush in the boiler shell itself. So leave it be.
Instead, having dismantled the rest of the gauge-frame, the T-pieces that form the upper and lower bodies should then unscrew from adaptor-bushes.
Unless there is some over-riding necessity, such as their threads leaking, I’d rather leave them be, too.
Why is the top one “loose”? I can’t see how you can safely turn either of those “nuts” with everything assembled anyway. Especially as we don’t know if their internal and external thread pitches differ, as trying to unscrew the adaptor with everything else all in place would create a thread conflict that if taken too far could end in trouble.