I don't know if it's going to work this way, but let's say it does:
The 5 years includes this season. This season Chandler was scheduled to make a pro-rated share of his qualifying offer. I believe that's somewhere around $800k.
Subtract that out, and this looks closer to a 4 year, $29 million deal. However, next season Chandler would have been restricted again, and worst case scenario, he would have been playing for $3 million again. Assume that, and he would have had to sign a 3 year, $26 million deal when he finally became an unrestricted free agent to make up the difference.
Factoring in his limited options, 5 years, $30 million doesn't sound terrible, so long as this season is one of those years (and I believe it has to be).