UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'U60ja/ksIKPaKpv1/ooq/M31sAufZy9CFfZvOAxKqMc=' 
WHERE 
  key_id = '989ff6bdc31b5b21d2aca3c89a3b432fd549518939b31fd9e42967ea06a5e5b8' 
  AND (
    token = 'U60ja/ksIKPaKpv1/ooq/M31sAufZy9CFfZvOAxKqMc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050