What you have to realize is that you're already screwed the minute the boss gives you the ultimatum of breaking the law or getting fired.
If you refuse, you get fired.
If you comply, the company gets caught, you get blamed, your boss mysteriously escapes accountability, you get fired anyway, and now you're stuck with a rap sheet.
So you're screwed no matter what you do.
What you do is get fired, find a new job, and point out during your interview that you were canned because you refused an illegal order and had to protect your rap sheet.
The legal system is a bigger bitch than your boss could ever be anyway. Pick the lesser of two evils.