How to proceed when a professor's timekeeping error hurts my course grade?
Let me restate what happened:

The professor informed students of the exam rules.
You followed the rules and failed the course.
Other students did not follow the rules.
The professor, as far as you know, has not punished the students who did not follow the rules.

Certainly, the professor should have punished students who did not follow the rules.  I would expect that students who turn in an exam late would get a grade of zero.  However, punishing other students will do nothing about the fact that you have failed the course.
Your reasonable course of action, as the student, is to retake the course.