rima.lua: add expiration of task locks