UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hYaroiu5VOsjDwZB/FS4Q1LzfrDYngxiUInFW2nooyY='
WHERE
key_id = 'ce8c22dfdbc8ef8384dac2e0cfa0f043b28522c203a86fb97cfd6115b2e724bb'
AND (
token = 'hYaroiu5VOsjDwZB/FS4Q1LzfrDYngxiUInFW2nooyY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)