I agree with SuperTrouper, except the problem may be completion anxiety, in which case you may be facing a meltdown when the time is up, yes?
We don't have this all the time, DS hates homework enough that it only happens when it's something he's successful at, but I understand the issue. I think you need to talk to the school about how much homework he can reasonably do in 20-minutes-per-grade-level, and see to it that they assign his homework accordingly.
There is so little help out there for rigidity issues (of which, I think this is one.) The answer always seems to be "teach your child to be more flexible," which is easier said than done. DS is considerably less rigid now that he's less anxious, but it's still there and we still have to fight with it. Hugs.