CarMax Inc. shares rose after the company reported comparable used-vehicle sales that expanded more than expected, showing its revival efforts are taking hold even in light of faltering consumer sentiment.