I suspect you would need to run a CRON daily which would trigger a script/function.
That script/function can then run the code to update your date.
Where does $post_id come from? Is it a custom post or a WooCommerce order?
Is it a published post or in a set status?
Basically, your script could simply be a WP Query that loops whatever the post type is, it should then update the post meta as you add your code above in the loop