Assuming:
$30k/yr pension
Retire at 56 live until 80, 24 years
Value of pension roughly $720,000
Unless you new position will allow you to save $72k+ per year I would stay where you are.
$40k is low for an airline pilot BUT you have to look at what you are flying and the fact you get a pension. That pension adds another $29,000 per year to your income, without having to save money in a 401k like the rest of us.