Get the last key set in a Sophia database