I did this yesterday. I bought the units from here:
There are various tips to make this easier.
Firstly, the unit doesn't twist by a full 45 degrees to unlock as you would imagine, it twists by approximately 15 degrees but the last couple are very tight. I used an adjustable spanner to give me some additional leverage on the lugs.
When loose, the unit slides out horizontally towards the back of the car rather than down.
When you are replacing the new units, insert them where you think they should go then check the lights using the hazard switch. If they flash, you know the connections are correct. Push the unit firmly into the light to ensure a secure fit then proceed to retighten the unit.
If you take your time, it is not too hard, just fiddly.