Sorry to hear that you are going through this. I have never had my back ‘lock up’, but my ribs often subluxate and sometimes dislocate. This causes unbearable pain. I have found that using a spring / coil free mattress has helped a little. Also, I like to use ice packs and Epsom salt baths.
Have you been able to identify what makes it better or worse?