More than 2,000 people who claim they are “mortgage prisoners” did not have the “express” terms of their contracts breached by being charged different interest rates by a bank, a judge has ruled.