US bakery business Flowers Foods has cut its earnings guidance despite an increase in second-quarter sales and profits.