I don't really feel I know enough about your situation and history to give you any advice, and I can't say that I've been in your situation either. I will just suggest that you trust your instincts on this one, and it sounds like you need to sit down and sort everything out.
You might want to write out the pros and cons to each potential future situation. Think about what you would need to do if you decided to continue in your marriage, and what you would need to do if you were to continue your newer relationship instead. Maybe list out the priorities you have. I'm sure the decision will effect your children as well - determine how you feel they might react either way. Don't forget to factor in which direction your heartstrings are being pulled - that matters too. You don't say how long your husband was locked away for, but if it has been a long time, then he may have been changed by the experience as well. Has he learned from whatever mistake he made that led to him being there? That would be an important factor, in my opinion.
Then look at what you've written about each possibility - perhaps even have a trusted friend look at what you've written too, to get an outsider perspective. Sometimes it is hard to see things when you are right in the center of it all. Then follow your instincts on what's right for you, your children, and the future.
Best of luck!