You need to remove the whole lock assembly from the car. there is a circlip inside that retains the lock barrel. All you have to do if I remember correctly is to swap the lock barrel to the new one then fit it all back together. To start off you will need to remove the trim inside the hatch to get access to the rear of the badge.
I think there is a couple of nuts inside the hatch that retain it on captive bolts attached to the lock. I have not actually removed one on a 145 but I have done a 164 a few years ago so am telling you from memory. I can't imagine it would be too difficult a job. If you remove the panel insdie the hatch behind the badge you should be able to see better.
Hi you need to chisel the snap off bolts on the housing then you can remove it after taking of the retaining rod inside the tailgate the bolt heads are on the outside of the badge housing a good center pop or a small chisel will do you can reuse the bolts if you do not have any new ones.