<PAGE>

                                                                 Exhibit 10.3(d)

                                                                  EXECUTION COPY

                                 AMENDMENT NO. 3
                                       TO
                              AMENDED AND RESTATED
                             MANAGED CARE AGREEMENT

     Amendment No. 3 dated as of December 23, 2003 ("Amendment No. 3") to the
Amended and Restated Managed Care Agreement, dated and executed as of May 28,
2003, between Merck & Co., Inc., a New Jersey corporation ("Merck"), and Medco
Health Solutions, Inc., a Delaware corporation ("Medco"), as further amended by
Amendment No. 1 dated as of July 23, 2003 ("Amendment No. 1") and effective as
of the Effective Date, and by Amendment No. 2 dated as of November 24, 2003
("Amendment No. 2") and effective as of October 1, 2003 (as amended by Amendment
Nos. 1 and 2, the "Agreement"). Capitalized terms used but not defined herein
shall have the meanings ascribed to them in the Agreement. All section
references used herein are to the Agreement.

     WHEREAS, Medco is in the business of providing PBM Services to
corporations, health maintenance organizations, unions, insurance carriers,
government employee plans and others;

     WHEREAS, Merck is a pharmaceutical company engaged in the discovery,
development, manufacturing and marketing of pharmaceutical products;

     WHEREAS, the parties desire to amend the Agreement to provide that if, for
any Calendar Quarter beginning on and after October 1, 2003, (a) the Medco Share
Weight for one of the specified Merck Products set forth on Schedule 6 to Annex
B attached hereto for the applicable Calendar Quarter has increased by 30% or
more from the 4Q 2001 Medco Share Weight (as defined herein) for such specified
Merck Product and (b) the Medco Market Share equals or exceeds the National
Market Share for such specified Merck Product, the MAS Premium Percentage shall
be calculated using the 4Q 2001 Medco Share Weight for that specified Merck
Product (rather than the Medco Share Weight for the applicable Calendar Quarter)
(with proportionate adjustments made to the Medco Share Weight used for each
other Merck Product) provided that calculating the MAS Premium Percentage in
this manner will result in a higher MAS Premium Percentage than would otherwise
result; and

     WHEREAS, this Amendment No. 3 shall be deemed to be effective as of October
1, 2003.

     NOW, THEREFORE, in consideration of the foregoing, the parties hereby agree
as follows, effective as of October 1, 2003:

                                       1

<PAGE>

          1. Annex B of the Agreement is amended to include the following
definitions in the appropriate alphabetical location:

          "4Q 2001 Medco Share Weight" shall be for each Merck Product the Medco
Share Weight for such Merck Product for the Calendar Quarter ended December 31,
2001 as determined by Merck and set forth in a notice delivered by Merck to
Medco.

          "Medco Share Weight Differential Percentage" shall mean for any Merck
Product set forth on Schedule 6 to Annex B for any Calendar Quarter the
percentage (which may be zero, negative or positive) obtained by dividing (x)(i)
the Medco Share Weight for such specified Merck Product for that Calendar
Quarter less (ii) the 4Q 2001 Medco Share Weight for such specified Merck
Product by (y) the 4Q 2001 Medco Share Weight for such specified Merck Product.

          "Affected Merck Product" means, for any Calendar Quarter, any Merck
Product set forth on Schedule 6 to Annex B with respect to which (i) the Medco
Share Weight Differential Percentage for such specified Merck Product is equal
to 30% or more for that Calendar Quarter and (ii) the Medco Market Share for
such specified Merck Product equals or exceeds the National Market Share for
such specified Merck Product for that Calendar Quarter.

          "Unaffected Merck Product" means, in relation to any Affected Merck
Product for a Calendar Quarter, each Merck Product other than such Affected
Merck Product.

          "Aggregate Unaffected Merck Products 4Q 2001 Medco Share Weight," when
calculated with reference to any given Affected Merck Product for a Calendar
Quarter, shall be equal to the result (expressed as a percentage) of 100% less
the 4Q 2001 Medco Share Weight for such Affected Merck Product.

          "Adjusted Medco Share Weight," when calculated with reference to any
given Affected Merck Product for any given Calendar Quarter, shall be equal to
(I) for such Affected Merck Product, its 4Q 2001 Medco Share Weight, and (II)
for each Unaffected Merck Product in relation to such Affected Merck Product,
the result (expressed as a percentage) obtained by multiplying (x) the quotient
obtained by dividing (1) the Aggregate Medco Cost of such Unaffected Merck
Product for that given Calendar Quarter by (2) the sum of the Aggregate Medco
Cost of all Unaffected Merck Products in relation to such Affected Merck Product
for that given Calendar Quarter by (y) the Aggregate Unaffected Merck Products
4Q 2001 Medco Share Weight calculated with reference to such Affected Merck
Product.

          "Medco Market Share Premium Percentage" for any Merck Product for any
Calendar Quarter means the result (expressed as a positive or negative
percentage) of (x)

                                       2

<PAGE>

(1) the Medco Market Share for that Merck Product for that Calendar Quarter
divided by (2) the National Market Share for that Merck Product for that
Calendar Quarter less (y) 100%; provided, that, if the Medco Market Share
Premium Percentage for any Merck Product calculated in accordance with the
foregoing for any Calendar Quarter would exceed 100%, the "Medco Market Share
Premium Percentage" for such Merck Product for such Calendar Quarter shall be
deemed equal to 100%.

          "Adjusted Weighted Medco Market Share Premium Percentage," when
calculated with reference to a given Affected Merck Product for a given Calendar
Quarter, shall be, for each Merck Product, equal to the result (expressed as a
zero, negative or positive percentage) obtained by multiplying (x) the Adjusted
Medco Share Weight for that Merck Product calculated for that Calendar Quarter
with reference to such Affected Merck Product by (y) the Medco Market Share
Premium Percentage for that Merck Product for that Calendar Quarter.

          "Adjusted MAS Premium Percentage," when calculated with reference to a
given Affected Merck Product for any given Calendar Quarter, shall be equal to
the sum of all the Adjusted Weighted Medco Market Share Premium Percentages for
all Merck Products as calculated for such Calendar Quarter with reference to
such Affected Merck Product; provided, that, for purposes of the calculation of
the Adjusted MAS Premium Percentage, (i) any New Merck Product shall not be
treated as a Merck Product during the Exclusion Period, and (ii) all Merck
Products included in a Non-MAS Group of Merck Products shall not be treated as a
Merck Product for any Calendar Quarter.

          2. The definition of "MAS Premium Percentage" as set forth in Annex B
of the Agreement is hereby amended to read in its entirety as follows:

          "MAS Premium Percentage" for any Calendar Quarter means the sum of the
     Weighted Medco Market Share Premium Percentages for all Merck Products for
     such Calendar Quarter; provided, that, for purposes of the calculation of
     MAS Premium Percentage, (i) any New Merck Product shall not be treated as a
     Merck Product during the Exclusion Period, and (ii) all Merck Products
     included in a Non-MAS Group of Merck Products shall not be treated as a
     Merck Product for any Calendar Quarter. Notwithstanding the foregoing, for
     any Calendar Quarter beginning on or after October 1, 2003 for which there
     are Affected Merck Products, the "MAS Premium Percentage" shall be equal to
     (other than for purposes of calculating the Outgoing Medco Plans MAS
     Premium Percentage and the Incoming Medco Plans MAS Premium Percentage) the
     highest Adjusted MAS Premium Percentage calculated with reference to any
     Affected Merck Product for that Calendar Quarter, unless the MAS Premium
     Percentage (as calculated in accordance with the first sentence of this
     definition) for that Calendar Quarter would be greater than such highest
     Adjusted MAS Premium Percentage.

                                       3

<PAGE>

          3. The definition of "Weighted Medco Market Share Premium Percentage"
as set forth in Annex B of the Agreement is hereby amended to read in its
entirety as follows:

          "Weighted Medco Market Share Premium Percentage" for any Merck Product
     for any Calendar Quarter means the result (expressed as a zero, negative or
     positive percentage) obtained by multiplying (x) the Medco Share Weight for
     that Merck Product for that Calendar Quarter by (y) the Medco Market Share
     Premium Percentage for that Merck Product for that Calendar Quarter.

          4. All references in the Agreement to the "Restated Agreement" are
references to the Agreement as previously amended and as amended by this
Amendment No. 3. The definition of "Restated Agreement" is hereby amended to
read in its entirety as follows:

          "Restated Agreement" means this Amended and Restated Managed Care
     Agreement, dated and executed on May 28, 2003, between Merck and Medco, as
     further amended by Amendment Nos. 1, 2 and 3 dated respectively as of July
     23, 2003, November 24, 2003 and December 23, 2003.

          5. This Amendment No. 3 may be executed simultaneously in two or more
counterparts, each of which shall be deemed an original, but all of which
together shall constitute one and the same instrument.

                                       4

<PAGE>

     IN WITNESS WHEREOF, the parties have executed this Amendment No. 3 to the
Agreement as of the date set forth above.

                                    MERCK & CO., INC.


                                    By: /s/ Margaret G. McGlynn
                                        ----------------------------------------
                                    Name:  Margaret G. McGlynn
                                    Title: President, U.S. Human
                                           Health Division

                                 MEDCO HEALTH SOLUTIONS, INC.

                                    By: /s/ Peter M. Sherman
                                        ----------------------------------------
                                    Name:  Peter M. Sherman
                                    Title: Vice President and Counsel

                                       5