UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XrpOuYLkETicIHTR6stAlLcuKgKRJ3eRsTdpJjIN4yo='
WHERE
key_id = '61b534aa66d503e53b9a51de855ea4d54c394e14ee7146a17d77cfc9daceb378'
AND (
token = 'XrpOuYLkETicIHTR6stAlLcuKgKRJ3eRsTdpJjIN4yo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)