It will last as long as you believe it is providing you with enough performance. My Q9450 @ 3.0GHz still provides me with enough performance. I plan on upgrading to Haswell or to Broadwell (2014). If I decide on Broadwell, then I will increase the OC.
For general daily use, web browsing, listening to music, watching video, a stock speed C2D E6300 would be more than enough. "Moderate gaming" varies from person to person, but if you are not looking to max out everything and add a powerful graphics card that could potentially be bottlenecked by your CPU, then you should be fine for the next few years.