Update API example to Lock