You woudln't do it in the template, you would do it in a PHP PRE controller. However, I would NOT recommend adjusting the timestamp of the order based on a coupon or other external factor. You should use a completely different field and I would suggest NOT modifying your database, but to use the $order_info.extras array instead.
You should use the 'math' function and assign the result to a variable for comparison.
If you are doing a comparison for validity, why are you formatting the result as a date rather than just comparing whether one timestamp is greater than the other?