update specific column of a row in mysql after every 5 minutes unsing node.js
<p>I am working on a project with node.js (not express) server and a mysql database. When a user clicks a button on the page, it uploads 2 values (say SpecificName, Yes/No). Now these values get inserted into the mysql database through the node server. Later, mysql runs a check for the specificName column (if it finds none, it then creates a column with the same Name) and updates the second value in it.</p>

<p>Now I would like to keep every update of the second value that the user makes through website (i.e yes) for 5 minutes in the mysql database after which it automatically updates the the specific location with another value (say cancel). I'm auspicious in solving every thing except this 5 minutes paradox. Also I'm keeping 15-20 so called specificName columns in which the value (say yes/no) is being updated and at the same time there are more than 1000 rows that are working simultaneously so a lots of 5 minute timers going on for the values. Is there a way to store value temporarily in mysql after which it is destroyed automatically?.</p>

<p>I came across :</p>

<ol>
<li>node-crons (too complex, don't even know if its a right choice)</li>
<li>mysql events (I'm not sure how to use it with node)</li>
<li>timestamp (can't create more than one timestamp (guess I need one for each column))</li>
<li>datetime (haven't tested it yet) and other things like
(DELETE FROM <code>table</code> WHERE <code>timestamp</code> &gt; DATE_SUB(NOW(), INTERVAL 5 MINUTE)).
Now I have no idea what to use or how to resolve this dilemma.</li>
</ol>

<p>Any help would be appreciated. </p>