I started getting back spasms a few years ago and it was like that. I couldn't do anything. Still happens 2 or 3 times a year. It's rough.
FWIW, I suffered from back spasms for about 3 years.
I was in an MMA fitness course with a local trainer and tweaked my back playing, of all things, a basketball "cool down" game after my workout. Well, doctor after doctor and a couple of crazy pills that were NOT worth taking (20 hours of groggyness, yuk!) I couldn't take it anymore. Sitting in a work chair sucked. Driving sucked. Everything sucked! I used to do some pretty intense poker tournaments but ended up pretty much dropping out because I couldn't sit for hours on end anymore (among other reasons).
The only thing that was a viable solution that had ZERO negative effects was one specific exercise. It's called the Superman and looks just as it sounds.
Lay on your stomach. Proceed to arch your back by imitating a flying form soaring through the air. Make sure that your arms, head and legs all leave the ground. Try to hold this arch for 10 seconds and do that 15 times in a set. After a week of doing only one set a day, you'll have built that muscle enough to not go through those spasms any longer. In fact, if I EVER feel one coming on NOW (if it's not too far progressed) I can do the stretch/exercise and the pain subsides.
Best thing I've ever done for myself!