SECOND AMENDMENT TO PROMISSORY NOTE, WARRANT AND REGISTRATION RIGHTS AGREEMENT