From: Rabbi Moshe Sofer
To: Rabbi Yechezkel Segal
A Jew sold his chametz to a non-Jew before Pesach at a reduced price, and after Pesach a second Jew preemptively purchased it from the non-Jew. The Chasam Sofer rules the chametz is fully permitted since the original sale was unconditional, but the second Jew must pay the first Jew the full appraised value.
Source: Shu"t Chasam Sofer OC §115