UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+lZajgdrXtjrbzTne3bQ0eq0csIA75wleKoAerco2JY='
WHERE
key_id = '90e698a321f3df75c036786b7ccee4f319395f65e9794bafc96f0bb7b630b71e'
AND (
token = '+lZajgdrXtjrbzTne3bQ0eq0csIA75wleKoAerco2JY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)