AMENDED AND RESTATED REGISTRATION RIGHTS AND LOCKUP AGREEMENT