This has worked perfectly for me the last three 5ks I have done.
Start an hour out. 20 minute warmpup progressing from very slow to tempo effort the last 3 minutes. Then spend ten minutes doing loosening drills (NOT stretching, never stretch before running, you lose power--look it up). By loosening I'm are talking about easy strides (no faster than race pace), butt kicks, high knees, a skips, b skips, etc. Just stuff that gets everything loose, but NO static stretching. Then I'll take a few minutes to rest before doing a couple of longer, harder strides (200 meters, finishing faster than race pace). 15 minutes out put on the spikes, ten minutes out do a couple of hard strides (shorter though, no more than a 100 meters), then just relax and stay calm from 5 minutes out till the gun.
3 races, 2 PRs, all feeling great throughout.
Last year, I did only 15 minutes warmup (easy) with a lot of static stretching. The result? MANY underachieving performances.
Don't be afraid to do a fair amount of volume before you race or to run hard for a bit. (with enough recovery after of course)