I store Android and iOS device tokens in DB. Following are few examples of device tokens getting saved in the DB.
How to differentiate whether a particular device token is for an Android or iOS device?
I recommend that you send additional information along with the token to the server. For example, information about what type of device the token was registered from, i.e. Android or iOS. A suitable solution is the setup a REST service for registering your tokens. If you implement this solution, you are future proof with regards to future changes in Android/iOS token length. Other useful information to store is the user id or similar.
I assume that you do are talking about your own DB where you store the tokens.