UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oKjfBPxNwqmDNmEtUANOeW2Aj//N/mp7Xj4UNxE4a0k='
WHERE
key_id = '30d84eb25ed05ca2345b711da7a393f1e2e90ab3556218a5dcc753d88395e94c'
AND (
token = 'oKjfBPxNwqmDNmEtUANOeW2Aj//N/mp7Xj4UNxE4a0k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)