Prices at the pump increased at a slower rate on a year-over-year basis in June compared to May, the data showed.