Exhibit 10.4


 





APPLIED OPTOELECTRONICS, INC.


 


AMENDED AND RESTATED TERM NOTE


 


	 	Sugar Land, TX
	$5,000,000	June 24, 2016


 


 


FOR VALUE RECEIVED, APPLIED OPTOELECTRONICS,
INC., a Delaware corporation (the “Borrower”), promises to pay to the order of COMERICA BANK (the “Lender”)
the principal amount of FIVE MILLION DOLLARS ($5,000,000), or, if less, the aggregate amount of Term Loan 1s (as defined in the
Credit Agreement referred to below) made by the Lender to the Borrower pursuant to the Credit Agreement referred to below outstanding
on the Term Loan 1 Maturity Date (as defined in the Credit Agreement) or in such amounts on such earlier dates as are provided
for in the Credit Agreement.


 


The Borrower also
promises to pay interest on the unpaid principal amount hereof from the date hereof until paid at the rates and at the times determined
in accordance with the provisions of the Credit Agreement.


 


All payments of principal
and interest in respect of this Amended and Restated Term Note (this “Note”) shall be made in lawful money of the United
States of America in same day funds at the office of the Lender described in the Credit Agreement.


 


This Note is a Term
Note referred to in, and is entitled to the benefits of, the Credit Agreement, dated as of June 30, 2015 (as amended, modified
or supplemented, the “Credit Agreement”) between the Borrower, the Agent and the Lenders, which among other things
provides for the acceleration of the maturity hereof upon the occurrence of certain events and for repayments in certain circumstances
and upon certain terms and conditions. Terms defined in the Credit Agreement have the same meanings herein.


 


This Note is secured
by the Security Documents.


 


The Borrower hereby
expressly waives presentment, demand, notice, protest and all other demands and notices in connection with the delivery, acceptance,
performance, default or enforcement of this Note and the Credit Agreement, and an action for amounts due hereunder or thereunder
shall immediately accrue.


 


The Lender and the
Borrower intend to conform to all applicable laws limiting the maximum rate of interest that may be charged or collected by the
Lender from the Borrower. Accordingly, notwithstanding any other provision hereof, the Borrower shall not be required to make
any payment to or for the account of the Lender, and the Lender shall refund any payment made by the Borrower, to the extent that
such requirement or such failure to refund would violate or conflict with mandatory and nonwaivable provisions of applicable law
limiting the maximum amount of interest which may be charged or collected by the Lender from the Borrower. To the fullest extent
permitted by law, in any action, suit or proceeding pertaining to this Note, the burden of proof, by clear and convincing evidence,
shall be on the Borrower to demonstrate that this Paragraph applies to limit any obligation of the Borrower under this Note or
to require the Lender to make any refund, or claiming that this Note conflicts with any applicable law limiting the maximum rate
of interest that may be charged or collected by the Lender from the Borrower, as to each element of such claim.


 


This Note shall be
governed by, and construed in accordance with, the laws of the State of New York without giving effect to its choice of law principles.


 


This Note amends and
restates the Term Note by the Borrower in favor of the Lender dated June 30, 2015 (the “Original Note”) in the amount
of $4,000,000; provided, however, that the execution and delivery of this Note shall not in any circumstances be deemed to have
terminated, extinguished or discharged the Borrower’s indebtedness under the Original Note, which indebtedness shall continue
under and be governed by this Note and the Credit Agreement. This Note is an amendment and restatement of the Original Note and
is NOT A NOVATION.


 


[Remainder of Page Intentionally Left Blank]


 




 


 


 






    	 	 	 



     

    

 


 





IN WITNESS WHEREOF, the Borrower has caused this Note to be
executed and delivered by its duly authorized officer, as of the date and the place first above written.


 


 





 


	 	APPLIED OPTOELECTRONICS, INC.
	 	 
	 	 
	 	By: /s/ CHIH-HSIANG (THOMPSON) LIN
	 	Name: CHIH-HSIANG (THOMPSON)
    LIN
	 	Title: President and CEO


 


 




 


 


 



 


 


 


 


 


 


 


 


 


 


 


 





[Signature Page to Amended and Restated
Term Note (Comerica – Term Loan 1s)]