Costco sold a record amount of gas during the quarter ended May 10, as consumers sought relief from rising prices caused by the war in Iran.