The Cobblers had taken the lead when former Shrimpers loanee Roy O'Donovan hooked home and they looked to be cruising towards victory when Bilel Mohsni was sent off for a foul on Chris Hackett.
However, Matthew Lund, who was making his Shrimpers debut after signing on loan from Stoke, headed home a right-wing corner from Kevan Hurst to level matters.
Northampton then survived some scares and stole it right at the death when captain Kelvin Langmead headed home from close range in the 90th minute.
"If you are going to win a game and not play particularly well that is how you do it," said Boothroyd.
"I thought overall we deserved it but I'm sure Paul Sturrock thinks his team could win it too.
"When a team goes down to 10 men everyone seems to get a new energy level and the team with 11 think it is going to be easy and take their foot off the gas, and I believe that is what we did.
"But, thankfully, we were able to grind it out and the long throws, which are getting us a lot of goals this season, came up trumps to help us win a tough game."
- Sports & Recreation
- Bilel Mohsni
- Matthew Lund
- Kelvin Langmead
- Kevan Hurst