§ 173-d. Whenever any street surface railroad is or may be operated along or upon any of the streets, roads, highways, avenues, parks or public places of any city, town or village, as to the construction and operation of which railroad the conditions set forth in section one hundred and seventy-one of this article have been complied with, or as to which such conditions are inapplicable, every such city, town or village shall have power to amend any existing license, grant, franchise or permit, or any of the terms, provisions or conditions thereof, whether granted by municipal authority or directly or indirectly by the state or otherwise, or any consent of local authorities, or any of the terms, provisions or conditions thereof, relating to the construction and operation of such railroad; and every city, town and village of this state shall have power by amendment to incorporate in any such license, grant, franchise, permit or consent all or any of the terms, agreements, stipulations and conditions of a terminable permit as herein authorized and defined; provided, however, that the amendment of any such license, grant, franchise, permit or consent shall only be made with the consent and agreement of the person, firm or corporation owning such license, grant, franchise, permit or consent or operating the street surface railroad thereunder.