[ci skip] avoid deprecation warning in sample code

Account.find(1, lock: true)
-> DEPRECATION WARNING: Passing options to #find is deprecated. Please build a scope and then call #find on it.
Merge pull request #12560 from sue445/modify_find_lock_sample_code

avoid deprecation warning in sample code [ci skip]