The lock unlock problem is probably the electrical wires that are going along the trunk arm, remove the left arm plastic protection and you will see a bunch of wires, remove the "hockey tape" then look for broken wire insulation, I am sure you have a short there.
Cut and fix with new wire the section that is broken up, solder them up if you can with heat shrink.
'85 Euro 635csi Race Turbo, megasquirt, Group A
'92 525i Touring 5 speed, 3.46 diff, UUC 8.5lb flywheel, soon to be turbo.
'02 Subaru WRX Wagon with STI springs, bigger sway bars