title: MySQL - return when row doesn't exists in other table or exists and the field is greater than x
body: <p>I have two tables:</p>
  
  <p>links</p>
  
  <pre><code> | id | ...
     1
     2
    ...
  </code></pre>
  
  <p>clicks</p>
  
  <pre><code> | linkid | userid | click_date |
      1     |   2    | ...
      4     |   2    | ...
      5     |   3    | ...
  </code></pre>
  
  <p>When users clicks a link from links it is added to clicks.</p>
  
  <p>I want to use MySQL query to return only links that user hasn't clicked - the pair linkid:userid isn't contained in the table or click_date (secs from Unix epoch) was yesterday in GMT.</p>