San Francisco-based snack food company Diamond Foods Inc will pay $5 million to settle civil charges that the company and two former top executives misled investors by lying about walnut costs to boost earnings, U.S. regulators said Thursday.