UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9Hil/cGdYYsllYk2xZvSIHrBvE0qSCB+NTrnzZaLThQ='
WHERE
key_id = '927cdf9307fe1b8aca9a39a7ea2fc54755649f3eb810f03e24512392d0c47b8c'
AND (
token = '9Hil/cGdYYsllYk2xZvSIHrBvE0qSCB+NTrnzZaLThQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)