IIRC the last time I canceled a flight it did count as a transaction, based on the date the miles were redeposited. If you're going to cancel your flight anyways, do it and see what happens to your expiry date. Worst case scenario you can then do another minimal transaction with any Aeroplan partner to extend the miles, but I don't think it'll be necessary.