A 2-1 success means Locke's side, who started the season with a 15-point deduction, are now in the black by two.
Second-bottom Partick are 19 points away, but that did not stop the manager talking up the psychological impact of Scott Robinson's winning goal.
He said: "We're finally in positive points territory and that will give everyone a big psychological boost. When we look at the league table we won't see that minus figure now.
"It has been a long hard slog to get where we are, but the place will get a lift. I've seen signs in the last few weeks that a bit of confidence is coming back.
"And we're delighted to get a win for the supporters because they came up here in good numbers again, so it was great to send them home happy at seeing a performance and result like that.
"I was absolutely delighted with the performance and if we'd taken out chances in the first half we could have been three or four up."
County boss Derek Adams said: "I've absolutely no complaints. Hearts started the game really well and caused us all manner of problems. Credit to them. I just thought we could have been better.
"I'm not sure where that performance came from because we've obviously beaten three of the top six in our last four games before this game.
"It was a bad day at the office, so we dust ourselves down and get going again."