If the goal is to change the expiration of a cookie
as it is being set then you need to edit the Set-Cookie response header's
Expires attribute.
But I think you're asking something different: How can I remove/expire a cookie that was set by a previous response?
You could just write a rule that deletes it from the outbound Cookie header in subsequent requests, but the browser itself would still think it had the cookie, and it would be seen by JavaScript, etc.
So, you probably do want to remove it. To do so, you'd need to use code like this: