Sqlite test fix

Functions that touch the expiry time of the task are prone to mismatch in timestamps. So it's still possible that the timestamp tests fail if the execution of the tests and callback are slow. Now the timestamp of the task is only set to the current timestamp if it was not set originally. And as always the timestamp is a Date() object.