I personally keep grain in the freezer to prevent any bugs from springing forward. Extract I keep in the fridge. I've kept both for a week to 1 &1/2 months. I have given the bucket with my malt extract a blast of CO2 and closed the lid on it, did it help preserve it??? I dunno, but it sure made me feel like it did something to protect it.
Now I have experimented with my LHBS slop buckets (they catch the dripping extract from the barrels) and made beer out of them, and the owner can't even tell me how old it is and it's normally a blend of all. He basically gives it to me, because we're friends.