Remove rear wheel
Pull sprocket away from wheel just enough to slip in a 19 mm open ended spanner (I think it's 19mm - it's been so long that I've forgotten) between the wheel and the sprocket carrier.
Make sure the hex bit of the sprocket fastener is located properly in the spanner jaws and then push the carrier back towards the wheel. This will "trap" the spanner and ensure that it doesn't slip on the hex bit.
Undo the corresponding 17mm nut using a socket or a ring spanner.
Repeat for the other fastners.
When re-fitting, use the same method but ensure you use 50Nm of torque.
There should be no need for a thread lock as the nuts are nylock jobbies anyway. Periodic checking is a good method to prevent them falling off.