UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fNUhLO6mJXBYSFcXjGqC0NfVlHdqQM/dj1dlCntSBgE='
WHERE
key_id = '8bd9a211eaa065a0d6beec482084c1dba12d8e909ef78c8d79151bf8e04fd196'
AND (
token = 'fNUhLO6mJXBYSFcXjGqC0NfVlHdqQM/dj1dlCntSBgE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)