You can cast a string to an interval, so you'll need to include the days part of it like so: ...now() - :expire::interval and then pass in the parameter like this: {:expire "5 days"}
...now() - :expire::interval
{:expire "5 days"}