title: Spring boot schedule task with shedlock not running by its delay
body: <p>I am using spring boot with shedlock to ensure my schedule task only run in an instance at the same time.</p>
  
  <p>Here is my config</p>
  
  <pre><code>@Configuration
  @EnableScheduling
  @EnableSchedulerLock(mode = 
  EnableSchedulerLock.InterceptMode.PROXY_METHOD, 
  defaultLockAtMostFor = "PT15M", 
  defaultLockAtLeastFor = "PT2M")
  public class SchedulerConfig implements SchedulingConfigurer {
  @Bean
  public LockProvider lockProvider(DataSource dataSource) {
      return new JdbcTemplateLockProvider(dataSource);
  }
  }
  </code></pre>
  
  <p>Here my task</p>
  
  <pre><code>@Scheduled(fixedDelayString = "2000")
  @SchedulerLock(name = "ms.demo.scheduleTaskJob1")
  public void scheduleTaskJob1() {
      logger.info("Fixed delay task called every 2 seconds after latest finished Execution Time - {}",dateTimeFormatter.format(LocalDateTime.now()));
  }
  </code></pre>
  
  <p>Here is shedlock table
      NAME
  LOCK_UNTIL
  LOCKED_AT
  LOCKED_BY</p>
  
  <p>Problem here is, when my task run the first time at 03-JUL-19 06.37.55.858685000 PM</p>
  
  <p>Shedlock will add 1 row to DB like this:</p>
  
  <pre><code>ms.demo.scheduleTaskJob1    03-JUL-19 06.52.37.178573000 PM 03-JUL-19 06.37.55.858685000 PM MB0001
  </code></pre>
  
  <p>Because defaultLockAtMostFor is 15 minutes</p>
  
  <p>When the task finished, it will update this record to unlock,
  and the row right now is:</p>
  
  <pre><code>ms.demo.scheduleTaskJob1    03-JUL-19 06.39.37.178573000 PM 03-JUL-19 06.37.55.858685000 PM MB0001
  </code></pre>
  
  <p>Because defaultLockAtLeastFor is 2 minutes. </p>
  
  <p>when to the next run of the task (2019-07-03T18:37:58.434650900Z), it will updateRecord to get lock by sql command </p>
  
  <pre><code>update shedlock set LOCK_UNTIL = '', lock_at = '' , locked_by = 'MB0001' where name = 'MB0001' and LOCK_UNTIL &lt;= '2019-07-03T18:37:58.434650900Z';
  </code></pre>
  
  <p>Cannot update, so the task will not running.</p>
  
  <p>Here I have to wait about 2 minutes until the current time is over LOCK_UNTIL (03-JUL-19 06.39.37.178573000 PM) while my task is configured with 2s delay
  So my task not run every 2s as expected, instead of that it will running every 2 minutes.</p>