I got it from MLB Trade Rumors, great question
Greinke has a full player opt-out clause after the third year of the deal, a Dodgers source tells Jim Bowden of ESPN.com (via Twitter). Furthermore, if Greinke is traded during the course of the contract he can opt out at end of year.
that's a copy and paste