I was wondering if sql has a way to reset a value of a table based on time.

an example would be like cookies you give it a time and they either get destoryed or deleted.

I made a table called items

item - Reset Time - active


apple - 7days - 1

I wanted to have the active chage to 0 after 7 days have passed.

My problem is that I just started sql and none of the books I have help answer my question.