title: How to get minimal free date
body: <p>I have mysql table records with property time and I want to insert new record with specified time, but if there is some other record with same time I need to shift new record time for specified interval until there will be no record at same time.<br>
  So I need sql query, which find me minimal free time from specified time, which is n-time shifted for specified interval. <br>
  For example if there is records with times 1,2,4,5,7 and new record with time 2 and interval 2, the query will return 6. </p>