UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '55I4ZcfjVAO5Ch4Qa1wgLFu/DhSmh+O2zpUMkCpWm3g='
WHERE
key_id = '2fc5c3e02add83822cb9ccf8818f6c2eac3f99ec63c82258124e3a6e61b2764d'
AND (
token = '55I4ZcfjVAO5Ch4Qa1wgLFu/DhSmh+O2zpUMkCpWm3g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)