Write a letter explaining that your railcard had in fact expired, and you had unfortunately neglected to notice this. Make sure you mention that this was your first journey for some time, hence you only just realising, otherwise suspicions will be aroused that you might have become a regular offender since it expired (if you were on the return portion of a return ticket, you'll need to word it very carefully!). Enclose a cheque for the fare for your journey, plus a reasonable sum, perhaps £50 or so if you're on a budget, more if you can afford it, to cover their 'admin' fees. Train Operating Companies tend to prefer three figure sums in these situations, but make a sensible assessment based on the fare and what you can afford. Do keep in mind that prosecution is a realistic option however, so don't take the mickey. What was the value of your original, discounted ticket? If it was pricey, you can probably get away with offering them just the difference between the original railcard discounted ticket that you had bought, and the full undiscounted fare, if this is a fairly significant amount. However, if we're talking a local journey of a few quid, I would suggest giving the full fare to assist in raising some goodwill.
Also include details of your replacement railcard order, explaining that you purchased it at the first opportunity having realised that your existing one had expired. And then hope they're feeling sympathetic!
What I very definitely wouldn't do is just ignore it, because it's very unlikely that that they'll forget about it. By being proactive and approaching them first, you'll have made a very sensible move.
There will be some very good advice along soon, plenty here who know the tickets and prosecutions business very well indeed.