expires can be str or datetime