One thing to keep in mind is that guards put in a lot of overtime. Example: Prisoner gets hurt and has to go to the hospital? A guard has to go with him, and he gets paid for all of it.
It's a pretty shitty job, mostly due to the work-life balance, but it pays pretty well for a job that doesn't require a college degree. A guard who puts in enough overtime can make 100k+ pretty easily, and that's in areas that aren't very expensive. After all, many prisons are in the middle of nowhere. For every San Quentin, there are a lot more Vacavilles.
Source: Girlfriend worked as a corrections nurse for a few years at the state prison and county jail levels. That's another shitty but well-paying job.
Sorry, should have specified that it's for California (both cops and guards). And it might be a highball figure (I didn't search too much).
From your article:
> There's also a lot of range between salaries in different parts of the country. In San Francisco, one of the least affordable cities in the country, cops get paid the most to reflect the cost of living, with an annual mean wage of $99,000. Meanwhile, cops in rural Mississippi earn the least: $29,870.
Similarly, prison guards also get paid more in California.
Whatever the case, I think cops do get paid a bit more, but I think it's much harder to get the job. Police might be penalised a bit for being in a glamour profession though (there's more people who want to be cops than prison guards - not many movies have a prison guard as the hero).
A quick web search shows cops making $100k, while guards make $70k.
I'd imagine the police are more selective though. It might not be "within reach" of a lot of people (low turnover, and higher requirements).