title: How do I increment a value in MySQL to a certain time in the future?
body: <p>I am trying to update a DATETIME field in a table. What I want for it is to always have three hours before it expires.</p>
  
  <p>My current code is:</p>
  
  <pre><code>UPDATE mindcore_sessions
    SET session_time = DATE_ADD(session_time, INTERVAL 3 HOUR)
    WHERE session_id = '$sessionId';
  </code></pre>
  
  <p>An example value would be: <code>2013-02-11 00:00:00</code>. If I run this query, it will change to: <code>2013-02-11 03:00:00</code>. Which is correct. <strong>But</strong>, if it is run again, it changes to <code>2013-02-11 06:00:00</code> and so on.</p>
  
  <p>What I want for it is to always be <strong>only</strong> three hours ahead. This is hard to explain, but I just want it to stay the same if it is run again. And if it is run again 1 minute later, I want it to increment by just one minute.</p>
  
  <p>Sorry if the question is verbose, but I am utterly confused (and it is late!).</p>
  
  <p>Thanks :)</p>