I am 38 and in the first year of a PhD. I am by no means the oldest PhD student - in fact there are some people who are doing them in their retirement (though that's for personal satisfaction, rather than career development). But of course 30, 40 or even 50 is not too old to develop your skills and change direction. You've got a lot of working years left - our generation is not going to be able to retire in their early 50s like lots of our parents. Go for it!
I started my PhD at 32 and am (hopefully) finishing it at 38! I don't feel too old to study at all, although it is different with three children hanging from the apron strings. I think as a mature student you have much advantage over the younger students, life experience, time management, ability to prioritise, more commitment as you are doing it out of your interest etc. I would say to go for it, in my opinion it is never too late