You may want to try to change out your central locking module. It's located behind the speaker panel on the driver's side. When they go bad, it will not allow the car to lock similar to what you've described. The module is a one time use. It has a trigger in it, that if the car is flips over it will automatically unlock the car so that one is not trapped inside.
Here's where it's located on REAL OEM.... It's part #17
If you have another E30, you can most likely swap it in and check. When you remove it, don't turn it over or upside down. It may make the switch go bad.