In any contract for the sale of railroad or street railway equipment or rolling stock, it is lawful to agree that title to the property sold or contracted to be sold, although possession thereof may be delivered immediately or at any time or times subsequently, shall not vest in the purchaser until the purchase price is fully paid, or that the seller shall have and retain a lien thereon for the unpaid purchase money.