a note about Civil War the cannon ball exploding...
...yes, it did explode as it was being disarmed, killing one person and sending fragments quite a distance BUT it is believed by many experts that this sort of thing is not the actual powder going off but, rather, an explosion of the highly volatile gas that is created when powder is moist over the years (from being buried for years in the earth) and reacts with the iron of the shell. A spark from the drill being used to disarm the shell ignites the gas and...boom. Many shells have been safely disarmed and the person doing it will hear a "whooshing" sound of the gas escaping the cavity of the shell. CW artillery shells are usually disarmed by submerging the shell in water and drilling with a drill press - not a perfect science under the best of circumstances. North South Trader's Civil War magazine had a wonderful article about this chemical reaction/gas explosion theory early last year, if memory serves me.
Back to your question - the powder in your pistol, if stored in a reasonably dry area/conditions, should last a long, long time.