SECOND AMENDED AND RESTATED REPLACEMENT CREDIT AGREEMENT Dated as of May 24, 2024 among ARGAN, INC., as the Company or Borrower, CERTAIN SUBSIDIARIES OF THE COMPANY, as Designated Borrowers, and BANK OF AMERICA, N.A., as the Lender