Make put faster as we check if a row already exists before a replace