Of course, this relies on the jobs being something that can be retried.
By using SELECT ... FOR UPDATE SKIP LOCKED, the record will automatically get unlocked if the worker crashes.
If we're talking PostgreSQL specifically, and newer-ish Postgres (9.5+ I think), then you can leverage its abilities to do all this in one atomic query:
UPDATE jobs
SET status='working'
WHERE id = (SELECT id
FROM jobs
WHERE status=NULL
LIMIT 1
FOR UPDATE
SKIP LOCKED)
RETURNING id3. When processing is complete the matching table entry is deleted.
4. There is a "reaper" process that checks for stale jobs ( based on time in the future ) and resets them to 0.
This of ouffcourse raises more questions.