> As long as the EU and UK parliaments both agree to do that
Under Article 50(3), extensions can only be granted by unanimity in the Council. The EP and Council both need to agree to a final agreement, but the EP doesn't seem to be involved in extensions at all.