UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cK/IXfTScLxSWB391m8T7Q8S0xNiSNnwL2QPgPtp070='
WHERE
key_id = 'f64fe534202626a554baf92fd8e11bab67bbc9acab3f47c9e66bd4062aaf689e'
AND (
token = 'cK/IXfTScLxSWB391m8T7Q8S0xNiSNnwL2QPgPtp070='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)