Change your lifestyle, change your life span — not smoking, watching your weight and continuing to learn new things could help you live longer, a new study says.