Longer M3 bolts could be cut shorter with a Dremel cutting wheel, deburred and then blackened with "Gun blue" liquid from a gun store.
I have done both of these things but not to re-blacken black bolts, and I have Gun Blue on hand for other things, otherwise it would not be cost-effective.