Run the numbers. You have already lost out on many years of wages by being in school. I bet you could make about $70k-$80k a year now fresh out of school. A masters may take you 2 years to complete and thus that is an opportunity cost of about $150k. Add the $40k cost of going to school on top of that and it may cost you $200k all together.
You have reached the point of diminishing returns for school/ training for deferred higher compensation. If you get a job and start pulling a wage in, you can pay off what debt you have now, get real world experience, and possibly use an employer’s education grants to get a masters while you work (may take more time to complete). Getting a masters while not working will push your break-even point out farther probably into your late 30s to early 40s.
I am 33 now and I am now breaking even with going to school for 5 years to get a BSNE. Getting my higher current wages vs. working from the age of 18 are just about equal now. The payoff for going to school is just now starting and I am 9 years out of school (8 years working). This includes the costs of school, wages, and other stuff associated with school bills. It is all gravy from here on out for me.
If I were you, I would get a job and take 3 hours a semester while I worked. You can bump up the hours from there when you feel confident that you can handle the course load. Pull in a pay check now and get out of Student Loan debt hell ASAP!
FYI the only way out of student loan slavery is either dying or paying it off!