I've been having the exact same problem for about 6 weeks now.
I got advice from a GP and from Nasser El Sonbaty
Both were pretty similar actually.
Look up "mechanical back pain" in google to see some stretches that you can do. There's one lower back stretching machine that some gyms have that help relieve pain and probably recover as well. Every time I go to the gym I use that stretching machine followed by going very light on a lower back machine (the one that's like hyperextensions except you sit upright and push backwards against a pad that's connected to the weight stack). After doing these two my back feels almost perfect for the next few hours so I can do the rest of my workout but I still stay away from deadlifts, bent over rows, seated cable rows, or any quad exercise besides leg extensions. I might add partial rep hack squats soon though since the pain is slowly getting better.
Another stretch you can do at home without gym equipment is to just lie on your back and bring your knees up and with your arms pull your knees towards your chest. Also, when sitting in a chair you can simply bend over, bringing your chest towards your knees. Try these stretches 3-4 times a day.
I'm hoping my pain will go away within another 6 weeks or so.
Nasser also recommended do these stretches even after the pain is relieved on a regular basis, to lessen the likelihood of it reoccuring.
The GP I saw said I can see a physiotherarpist or chiropractor but that it wasn't really necessary. He also said X-Ray is pointless since the damage is not to the bones.