UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fAKPvCqOh9/Cjdc7qPJeHwrqojS6eN916DxJ+jGrh4k='
WHERE
key_id = '025f18126be34c3824f5634aae6519a933fd17c405c7e919299b0ac53e4012f5'
AND (
token = 'fAKPvCqOh9/Cjdc7qPJeHwrqojS6eN916DxJ+jGrh4k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)