Scottish Law Questions? Ask a Scots Lawyer
If the house is owned in joint names you can change the locks, however, if your husband forces the new locks there is nothing the police can do. You can't be charged with breaking into your own house.
If the house is owned in your name only, you can't change the locks as he will have occupancy rights.
What you really need is a separation agreement that gives you exclusive use of the former matrimonial home until the finances are sorted out. I assume after 22 years there will be a number of financial matters to sort out.
You really need a solicitor to deal with this for you. I suspect your husband has been aggresive and this is why you feel the need for security. If his behaviour has caused you to be alarmed a solicitor can seek a matrimonail interdict to keep him away from the house.
Hope this helps
I would ask if there is any children under 16 or in full time education involved.
Secondly why do you feel the need to have the locks changed? Is it because you fear him or is there are other reasons?