UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fbHfYhLCHkjWqeaSaI7rL7gvTf3/4+qKvOfqK1tEn2s='
WHERE
key_id = '372eee1cc373fb1d27aff5446ed8f6a173255ab0d5a6e556dd1e461c48bd4644'
AND (
token = 'fbHfYhLCHkjWqeaSaI7rL7gvTf3/4+qKvOfqK1tEn2s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)