Exhibit 10.40

Pursuant to 17 CFR 240.24b-2, confidential information has been omitted in places marked [* * *] and has been filed separately with the Securities and Exchange Commission pursuant to a
Confidential Treatment Application filed with the Commission.

AMENDMENT TO LICENSE AND DISTRIBUTION AGREEMENT

This Amendment to License and Distribution Agreement (this Amendment) is made and effective as of August 31, 2005 by and
between Keurig, Incorporated, a Delaware corporation (Keurig), and Diedrich Coffee, Inc., a Delaware corporation (Diedrich). Capitalized terms used in this Amendment without definition shall have
the respective meanings ascribed to such terms in that certain License and Distribution Agreement dated as of July 29, 2003 by and between Keurig and Diedrich, as amended (as so amended, the License Agreement).

RECITALS:

Keurig and
Diedrich desire to modify certain terms of the License Agreement.

NOW, THEREFORE, for good and valuable consideration, the receipt and
sufficiency of which is hereby acknowledged, the parties hereby agree as follows:



|A. | Amendments to the License Agreement.
|-- | ------------------------------------



| | 1. | Section 2.1.3: Section 2.1.3 is hereby deleted in its entirety and replaced with the following:
| | -- | -----------------------------------------------------------------------------------------------



| | 2.1.3 | Subject to Diedrichs rights to the Packaging Lines and Section 14, below, Keurig expressly reserves the right to appoint other entities as Licensed Roasters without
restriction upon the manufacture and sales of K-Cups by another entity. Keurig expressly reserves to itself the right to manufacture and sell K-Cups to any AFH or AH customer account inside or outside the Territory, provided, however, that Keurig
will not knowingly solicit Diedrichs or Diedrich Affiliates AFH customers or Diedrichs Affiliates for K-Cup sales. Except as provided in Section 2.3, in no event shall Diedrich be required to produce any minimum number of
K-Cups or particular flavor or variety of K-Cup.
| | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | 2. | Section 6.4.3: Section 6.4.3 is hereby deleted in its entirety and replaced with the following:
| | -- | -----------------------------------------------------------------------------------------------



| | 6.4.3 | Review of Books and Records.
| | ------ | ----------------------------

| |  | Upon reasonable request, Diedrich may, at its expense, have an independent auditor audit such books and records of Keurig as are necessary or appropriate to verify Keurigs
compliance with Section 6.4.1, 7.1.5, 7.2.5, 8.2 and 8.3. Such independent auditor shall agree in writing to maintain the confidentiality of all of Keurigs records and shall be allowed only to certify to Diedrich whether or not Keurig has
complied with the applicable Section. Such review shall take place upon reasonable written notice at a mutually agreed time during regular business hours.
| |  | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



---

Pursuant to 17 CFR 240.24b-2, confidential information has been omitted in places marked [* * *] and
has been filed separately with the Securities and Exchange Commission pursuant to a Confidential Treatment Application filed with the Commission.



| | 3. | Section 8.8: Section 8.8 is hereby deleted in its entirety and replaced with the following:
| | -- | -------------------------------------------------------------------------------------------



| | 8.8 | No Restrictions.
| | ---- | ----------------

| |  | Keurig maintains its own sales force to promote Keurig Products and K-Cups to customers. Subject to the other terms of this Agreement, nothing in this Agreement shall be construed
to restrict Keurig in the resale, pricing or other terms of sale of any Keurig Product or K-Cups to any customer inside or outside of the Territory.
| |  | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | 4. | Section 9.1: Section 9.1 (Away From Home Brewers) is hereby deleted in its entirety and replaced with the following:
| | -- | ----------------------------------------------------------------------------------------------------------------------



| | 9.1 | Away From Home Brewers.
| | ---- | -----------------------

| |  | Keurig shall provide Diedrich with a limited one-year warranty on each Keurig AFH Brewer from the date of shipment to Diedrich (the Keurig AFH Warranty). Keurig
warrants that Keurig AFH Brewers will be free of design, material and workmanship defects and fit for their intended use. Keurig will repair or replace Keurig AFH Brewers for a period of one (1) year from date of shipment to Diedrich any
defective Keurig AFH Brewer. If a Keurig AFH Brewer is found to be defective within 30 days of shipment, Keurig shall first attempt to effect the repair such brewer. If Keurig determines that it will not be able to effect the repair of a Keurig AFH
Brewer found to be defective within 30 days of shipment, Keurig will replace such brewer with a new brewer. If a Keurig AFH Brewer is found to be defective more than 30 days after shipment, Keurig in its sole discretion shall repair such brewer or
replace such brewer with a refurbished brewer in like new condition. Keurig will not use any warranty registration process to intentionally solicit consumers that purchased the Keurig AFH Brewer from Diedrich.
| |  | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | 5. | Section 11.2: Section 11.2 is hereby deleted in its entirety and replaced with the following:
| | -- | ---------------------------------------------------------------------------------------------



| | 11.2 | Diedrich Advertising of AH Products.
| | ----- | ------------------------------------

| |  | Diedrich shall be required to advertise the availability from Diedrich or Keurig of Keurig AH Product offerings (e.g., that Diedrich or Keurig offers an AH line of products using
Keurigs brewing technology). This shall include but not be limited to promoting Keurig AH Products in Diedrichs website and catalogs, and, as practicable at Diedrichs discretion, in Diedrichs company owned retail locations
and on packaging materials for Diedrich K-Cups (e.g. the front of the current 25-pack sleeve of Diedrich K-Cups). Notwithstanding the foregoing, Diedrich may first deplete its inventories of printed matter in its possession or under its control
prior to the AH Launch before complying with the requirements of this Section, provided that such inventories are purchased in accordance with Diedrichs normal course of business.
| |  | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



2



---

Pursuant to 17 CFR 240.24b-2, confidential information has been omitted in places marked
[* * *] and has been filed separately with the Securities and Exchange Commission pursuant to a Confidential Treatment Application filed with the Commission.



| | 6. | Section 16.1: Section 16.1 is hereby deleted in its entirety and replaced with the following:
| | -- | ---------------------------------------------------------------------------------------------



| | 16.1 | Except in the event of knowing and intentional submission by Diedrich to Keurig of false or fraudulent reports or statements (in which case all rights by the Terminated Roaster
Distributor to purchase Keurig Products and K-Cups hereunder shall irrevocably cease), and subject to the other terms and conditions of this Section 16, the Terminated Roaster Distributor may continue to purchase K-Cups and other Keurig
Products, but not Keurig Brewers, from Keurig at Keurigs [* * *] on [* * *] and K-Cups from Licensed Roaster(s), provided Diedrich and such Licensed Roaster(s) are able to agree on such arrangement, at prices and terms
agreed between such Licensed Roaster(s) and Diedrich for the sole purpose of supplying the requirements of the Keurig Brewers owned by Diedrich and Diedrichs Affiliates so long as such Keurig Brewers remain within the Territory
(Installed Brewers). Keurig hereby agrees to pass through to Diedrich any expressed or implied warranties of any Licensed Roaster in connection with such Licensed Roasters K-Cups purchased under this Agreement. Keurig reserves the
right to establish separate credit terms or no credit terms for the Terminated Roaster Distributor, in its absolute discretion. Keurig may require, as a condition to Keurigs obligations under this Section 16.1, that all amounts owed by
the Terminated Roaster Distributor to Keurig, notwithstanding prior terms of sale, become immediately due and payable and any other faults or breaches under this Agreement be cured. If Keurig so requires, the Terminated Roaster Distributors
rights under this Section 16.1 shall be tolled until all such amounts have been paid in full and/or such faults or breaches cured. Any termination of this Agreement shall not affect any other rights then accrued. Keurigs obligations to
continue to supply K-Cups and Keurig Products, but not Keurig Brewers, hereunder shall continue only so long as Keurig continues to provide the applicable Keurig Products or K-Cups in the ordinary course of its business within the Territory.
| | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



|B. | Miscellaneous.
|-- | --------------



| | 1. | Except as amended hereby, all other terms and conditions of the License Agreement shall continue in full force and effect. In the event of conflict between the terms of this
Agreement and the terms of the License Agreement, the terms of this Agreement shall control.
| | -- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | 2. | This Amendment and the License Agreement, as incorporated by reference herein, represent the entire understanding and agreement between the parties as to the subject matter hereof
and supersede all prior agreements and understandings, oral or written, between the Parties as to the subject matter hereof.
| | -- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



3



---

Pursuant to 17 CFR 240.24b-2, confidential information has been omitted in places marked [* * *] and
has been filed separately with the Securities and Exchange Commission pursuant to a Confidential Treatment Application filed with the Commission.



| | 3. | This Amendment maybe executed in any number of counterparts, all of which taken together shall constitute one and the same instrument, and any of the parties hereto may execute this
Amendment by signing any such counterpart.
| | -- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

IN WITNESS WHEREOF, the parties have executed this Amendment as of and effective
the date first above written.



KEURIG, INCORPORATED/s/ Nicholas LazarisBy:

Nicholas LazarisTitle:

President and Chief Executive Officer




DIEDRICH COFFEE, INC./s/ Roger LavertyBy:

Roger LavertyTitle:

President and Chief Executive Officer




4