Hi @MathiasS,
I run LOS 17.1 with microg and have locked it. Locking is really easy (‘fastboot oem lock’, like @Alex.A wrote). But please consider that the phone will do a factory reset while locking. Came as a surprise for me.