UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'geoOlib95APW8xkOfP6eA6fGPE950tfIqnmprgKwBa4='
WHERE
key_id = '36009bfcef35c42ffb7299078bb0ef4e1f87fc2ce401adf1b20b798cda0cd5cb'
AND (
token = 'geoOlib95APW8xkOfP6eA6fGPE950tfIqnmprgKwBa4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)