Effective from 20 February 2019 is a new policy by the largest Japanese carrier that allows removing the SIM lock on second-hand smartphones.
This means you can now safely buy a phone from an auction, a second-hand dealer, or receive it as a gift from someone, and not worry about how you are going to get it unlocked. Previously, only the original owner, and within a specially defined period, could apply for a SIM-unlock. (Those conditions remain in effect for newly purchased devices.)
The previous unlocking policy had led to the appearance of online sellers offering the service, often at a steep price. For example, the fee to unlock the Aquos R2 is between 5000 and 6000 Yen, while the price to unlock the Aquos R is 4500 Yen. In the past couple of years we've even seen fees as high as 8000 Yen.
The fee to unlock your second-hand device at a Docomo shop will be 3000 Yen before tax, or a total of 3150 Yen tax included. Of course, some older models can be unlocked for less if you buy the IMEI unlock code online, e.g. 2300 Yen for the Aquos Zeta SH-04H.
If you are a registered user of the Docomo website (have a d-account), you will be able to unlock second-hand devices for free.
It is unclear how long it will take for the other carriers to follow suit. Offering to lift the SIM lock on second hand phones is not Docomo's own idea – it is dictated by the Japanese Ministry of Communications that issued last year a strong recommendation to operators to facilitate the continued use of second-hand phones, which includes enabling them to work on competitors' networks. So, sooner or later, SoftBank and AU will have to launch the same service.