You can terminate the rental contract before its expiration date if it is agreed upon in the contract or if you and the landlord come to an agreement. There may be penalties for early termination.