You may want to check the moodle server session handling setting. I had a problem like this once, users sessions timing out during long quizzes, or at least them starting a quiz, then walking away and trying to submit much later and their session had timed out.
I changed the timeout setting to 4 hrs.
Site Admin | Server | Session handling.
This is on a moodle 2.2 instance.