user_db: random value SQL helpers

Signed-off-by: Alex Dubov <oakad@yahoo.com>