Pain in chest & back when exercising

I just joined a exercise class and was doing planks and it was little hardcore it felt. I was listening to the teacher and taken deep breaths in through nose and out the mouth, I’m not sure I might have overly breathed lol but I felt a tighten and pain in my chest that went through my back. Whilst doing these but felt fine afterward. It’s my first time exercising in long long while. Could this just be the reason why I felt that way or something serious? Thanks in advance.