You can under certain circumstances that you have the machine replaced, they have been able to transfer.
However IMO its better to get a new warranty to cover the entire lifespan of the new Mac as the warranty for 2011 iMac will only cover the remainder of that imacs warranty.