Three masked raiders who terrorised a family with young children have been jailed for a total of more than 40 years.