Reduce resolution of time clause of the "get next job" query

Currently when getting the next job, the timeout is tested to the
microsecond. However this is overkill and keeps the SQL query
cache from being as effective as the query will change by the
microsecond. Minute resolution is sufficient and will allow
query caching to be more effective.

Fixed a small bug in simple db api.