code: func (db *DB) SetEX(key []byte, duration int64, value []byte) error {
  	if err := checkKeySize(key); err != nil {
  		return err
  	} else if err := checkValueSize(value); err != nil {
  		return err
  	} else if duration <= 0 {
  		return errExpireValue
  	}
  
  	ek := db.encodeKVKey(key)
  
  	t := db.kvBatch
  
  	t.Lock()
  	defer t.Unlock()
  
  	t.Put(ek, value)
  	db.expireAt(t, KVType, key, time.Now().Unix()+duration)
  
  	return t.Commit()
  }
docs: // SetEX sets the data with a TTL.